<?php defined('_JEXEC') or die('Restricted access'); ?>

<div class="article-text-indent">
    <div class="clear">
        <form id="searchForm" action="<?php echo JRoute::_( 'index.php?option=com_search' );?>" method="post" name="searchForm">
            <div class="searchArea">
                <table class="contentpaneopen<?php echo $this->escape($this->params->get('pageclass_sfx')); ?>">
                    <tr>
                        <td nowrap="nowrap"><label for="search_searchword" class="indent-search-searchword"> <?php echo JText::_( 'Search Keyword' ); ?>: </label>
                            &nbsp; </td>
                        <td nowrap="nowrap"><input type="text" name="searchword" id="search_searchword" size="30" maxlength="20" value="<?php echo $this->escape($this->searchword); ?>" class="inputbox" />
                            &nbsp; </td>
                        <td width="100%" nowrap="nowrap"><button name="Search" onclick="this.form.submit()" class="button png"><?php echo JText::_( 'Search' );?></button></td>
                    </tr>
                    <tr>
                        <td colspan="3" style="padding:20px 0px 20px 0px;"><?php echo $this->lists['searchphrase']; ?>&nbsp;&nbsp;
                            <label for="ordering"> <?php echo JText::_( 'Ordering' );?>: </label>
                            <?php echo $this->lists['ordering'];?> </td>
                    </tr>
                </table>
                <?php if ($this->params->get( 'search_areas', 1 )) : ?>
                <?php echo JText::_( 'Search Only' );?>:
                <?php foreach ($this->searchareas['search'] as $val => $txt) :
			$checked = is_array( $this->searchareas['active'] ) && in_array( $val, $this->searchareas['active'] ) ? 'checked="checked"' : '';
		?>
                <input type="checkbox" name="areas[]" value="<?php echo $val;?>" id="area_<?php echo $val;?>" <?php echo $checked;?> />
                <label for="area_<?php echo $val;?>"> <?php echo JText::_($txt); ?> </label>
                <?php endforeach; ?>
                <?php endif; ?>
            </div>
            <table class="searchintro<?php echo $this->escape($this->params->get('pageclass_sfx')); ?>">
                <tr>
                    <td colspan="3" ><br />
                        <?php echo JText::_( 'Search Keyword' ) .' <b>'. $this->escape($this->searchword) .'</b>'; ?> </td>
                </tr>
                <tr>
                    <td><br />
                        <?php echo $this->result; ?> </td>
                </tr>
            </table>
            <br />
            <?php if($this->total > 0) : ?>
            <div align="center" class="clearfix">
                <div style="float: right;">
                    <label for="limit"> <?php echo JText::_( 'Display Num' ); ?> </label>
                    <?php echo $this->pagination->getLimitBox( ); ?> </div>
                <div style="float:left"> <?php echo $this->pagination->getPagesCounter(); ?> </div>
            </div>
            <?php endif; ?>
            <input type="hidden" name="task"   value="search" />
        </form>
    </div>
</div>
